package com.zz.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 报名审核
 * @author zhouzi
 */
@Data
@ApiModel("报名审核")
public class ApplicationAuditing implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(type= IdType.AUTO)//主键自增
    @NotNull(message = "报名审核表主键不能为空")
    private Integer id;

    //学号
    @ApiModelProperty("学号")
    @NotNull(message = "用户学号不能为空", groups = {Update.class})
    @Range(min = 1000000000, message = "用户学号为10位")
    private Integer userId;

    //活动编码
    @ApiModelProperty("活动编码")
    @NotNull(message = "活动编码不能为空", groups = {Update.class})
    private Integer activityId;

    //报名时间
    //@TableField(fill = FieldFill.INSERT_UPDATE)//用户报名活动时,自动填入当前时间
    @ApiModelProperty("报名时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @NotNull(message = "用户报名时间不能为空")
    private Date registerTime;

    //操作
    @ApiModelProperty("操作")//0 不通过 1 通过
    private Integer operate;

    //状态码
    @ApiModelProperty("状态码")//0 未审核 1 已审核
    private Integer status;

//    @ApiModelProperty("是否填写调查问卷")//0 没有 1有
//    private Integer questionnaire;
}
